package com.gitbl.webchat.service;

import com.gitbl.webchat.message.RoomMessage;
import com.gitbl.webchat.message.RoomsNodeMessage;

import java.util.List;

public interface RoomService {
    boolean ping();
    String address();

    String KEY_NODE_PRE="node.";
    String KEY_ROOM_PRE="room.";
    String KEY_ROOM_TITLE_PRE="room.title.";

    RoomMessage getRoom(String id);
    RoomMessage createRoom(String title,String user);

    List<RoomMessage> queryRooms(String name);

    void closeRoom(int id);
    void registNode(RoomsNodeMessage node);
}
